<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Blog Template for Bootstrap</title>

    {% load staticfiles %}

    <link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/custom.mengbi.css' %}" rel="stylesheet">
    <!-- Bootstrap core CSS -->

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <!--<link href="../../assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">-->


    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<div class="blog-masthead">
    <div class="container">
        {% block navbar %}
        <nav class="blog-nav navbar-static-top">
            <a class="blog-nav-item logo"  href="/"><b>机器学习社</b></a>
            <a class="custom-menu-index blog-nav-item"  href="/">文章</a>
            {% for m in ctx.menu %}
            <a class='custom-menu blog-nav-item'  href="{{ m.url }}">{{ m.name }}</a>
            {% endfor %}
            <!--<a class="blog-nav-item" href="#">阅读</a>-->
            <!--<a class="blog-nav-item{% ifequal  title 'about' %} active{% endifequal %}" href="#">关于</a>-->
            <form class="navbar-form navbar-right">
                <input type="text" class="form-control" placeholder="搜索">
            </form>
        </nav>
        {% endblock %}
    </div>
</div>

<div class="container">

    <div class="blog-header">
    </div>

    <div class="row">

        <div class="col-sm-8 blog-main">

            <!--<div class="blog-post">
                <h2 class="blog-post-title">Sample blog post</h2>
                <p class="blog-post-meta">January 1, 2014 by <a href="#">Mark</a></p>

                <p>This blog post shows a few different types of content that's supported and styled with Bootstrap. Basic typography, images, and code are all supported.</p>
            </div>-->
            {% block content %}
            <div class="blog-post">
                <h2 class="blog-post-title">Another blog post</h2>
                <p class="blog-post-meta">December 23, 2013 by <a href="#">Jacob</a></p>

                <p>Cum sociis natoque penatibus et magnis <a href="#">dis parturient montes</a>, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Sed posuere consectetur est at lobortis. Cras mattis consectetur purus sit amet fermentum.</p>
            </div><!-- /.blog-post -->

            <div class="blog-post">
                <h2 class="blog-post-title">New feature</h2>
                <p class="blog-post-meta">December 14, 2013 by <a href="#">Chris</a></p>

                <p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
                <ul>
                    <li>Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</li>
                    <li>Donec id elit non mi porta gravida at eget metus.</li>
                    <li>Nulla vitae elit libero, a pharetra augue.</li>
                </ul>
                <p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>

            </div><!-- /.blog-post -->
            {% endblock %}

            {% block pager %}
            <nav>
                <ul class="pager">
                    <li><a href="#">上一页</a></li>
                    <li class="pull-right"><a href="#">下一页</a></li>
                </ul>
            </nav>
            {% endblock %}

        </div><!-- /.blog-main -->

        <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
            {% block hot %}
            <div class="sidebar-module">
                <h4>热门文章</h4>
                <ol class="list-unstyled">
                    {% for h in ctx.hot %}
                    <li><a href="/article/{{ h.id }}.html">{{ h.title }}</a></li>
                    {% endfor %}
                </ol>
            </div>
            {% endblock %}

            <div class="sidebar-module">
                {% block categories %}
                <h4>分类浏览</h4>
                <ol class="list-unstyled">
                    {% for c in ctx.categories %}
                    <li><a href="/category/{{ c.id }}/1.html">{{ c.name }}</a></li>
                    {% endfor %}
                </ol>
                {% endblock %}
            </div>
            <div class="sidebar-module sidebar-module-inset">
                {% block about %}
                <h4>关于本站</h4>
                <p>兴趣使然的<b>机器学习</b>小站.</p>
                {% endblock %}
            </div>
            <div class="sidebar-module">
                {% block links %}
                <h4>友情链接</h4>
                <ol class="list-unstyled">
                    {% for l in ctx.links %}
                        <li><a href="{{ l.url }}">{{ l.name }}</a></li>
                    {% endfor %}
                </ol>
                {% endblock %}
            </div>
        </div><!-- /.blog-sidebar -->

    </div><!-- /.row -->

</div><!-- /.container -->

{% block footer %}
<footer class="blog-footer">
    <p><a href="http://jiqixuexi.org">机器学习社@2016</a></p>
    <!--<p>
        <a href="#">回到顶部</a>
    </p>-->
</footer>
{% endblock %}

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="//cdn.bootcss.com/jquery/1.12.1/jquery.js"></script>
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
<script>
    $().ready(function(){
        var _url = window.location.href.replace(/\//g,"");
        var hasDone = false
        $(".custom-menu").each(function () {
            if ($(this).prop("href").replace(/\//g,"") == _url) {
                $(this).addClass("active");
                hasDone = true;
                return false;
            }
        });
        if(!hasDone){
            $(".custom-menu-index").addClass("active");
        }
        {% block customjs %}
        {% endblock %}
    })
</script>

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<!--<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>-->
</body>
</html>